package com.yuexiao.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuexiao.pojo.User;
import com.yuexiao.service.DishService;
import com.yuexiao.service.UserService;
import com.yuexiao.mapper.UserMapper;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
* @author Administrator
* @description 针对表【user(用户信息)】的数据库操作Service实现
* @createDate 2022-08-10 14:10:57
*/
@Component
@Service(interfaceClass = UserService.class)
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{


    @Override
    public User getUserByPhone(String phone) {
        return baseMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getPhone,phone));
    }
}




